#define _CRT_SECURE_NO_WARNING
#include<iostream>
#include<unordered_map>
using namespace std;

class Solution {
public:
    vector<int> twoSum(vector<int>& nums, int target) {
        unordered_map<int, int>hash;
        for (int i = 0; i < nums.size(); i++)
        {
            int x = target - nums[i];
            if (hash.count(x))return{ hash[x],i };
            hash[nums[i]] = i;
        }
        return { -1,-1 };
    }
};
int main()
{

    return 0;
}